﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Yxinmt.Interface
{
    public interface IComponent
    {
        Guid Id { get; set; }
        string Name { get; set; }
        IWindow Window { get; set; }

        List<IComponent> ComponentList { get; set; }
        List<IControl> ControlList { get; set; }

        /// <summary>
        /// 获取控件列表
        /// </summary>
        /// <returns></returns>
        List<System.Windows.FrameworkElement> GetElements();

        /// <summary>
        /// 事件加载
        /// </summary>
        void EventLoad();

        /// <summary>
        /// 数据加载
        /// </summary>
        void DataLoad();

        object GetValue();

        void SetValue(object value);

        bool IsEdit();

        bool ValidateNullable(out string message);

        void SetVisible(bool visible);

        bool GetVisible();

        IComponent Add(Dictionary<string, object> property);

        void Remove(Dictionary<string, object> property);

        void SetBackColor(string color);

        List<IControl> GetComponentsControls();
    }
}
